<?php

use Illuminate\Database\Seeder;

class Admin_Users_Seeder extends Seeder
{
    /**
     * @author mais <[<380354618@qq.com>]>
     * 后台用户表 admin_users
     * 随机填充数据 100条
     * @return void
     */
    
    public function run()
    {
    	$name_1 = '麦吴陈谢刘李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏水窦章云苏潘葛奚范彭郎鲁韦昌马苗凤花方俞任袁柳酆鲍史唐费廉岑薛雷贺倪汤滕殷罗毕郝邬安常乐于时傅皮卞齐康伍余元卜顾孟平黄和穆萧尹';
    	$name_2 = '志伯新俊冠盛林刁锺徐邱骆高夏蔡田樊胡凌霍虞万支柯昝管卢莫经房裘缪干解应宗丁宣贲邓郁单杭洪包诸左石崔吉钮龚程嵇邢滑裴陆荣翁荀羊於惠甄麴家封芮羿储靳汲邴糜松井段富巫乌焦巴弓牧隗山谷车侯宓蓬旁崇栋告休褒谏锐皋闳在歧';
    	$name_3 = '建恒彬杰生示是委钊频嬴呼大威昂律冒保系抄定化莱校么抗祢綦悟宏功庚务敏捷拱兆丑丙畅苟随类卯俟友答乙允甲留尾佼玄乘裔延植环同蚁止戢睢冼种涂肖己泣潜矫赛昔侍度旷遇偶前由咎塞敛受泷袭衅叔圣御夫仆镇藩邸府掌首员焉戏可智';

        
        for ($i=0; $i < 20 ; $i++) { 
            DB::table('admin_users')->insert([
    	            'uname' => 'admin'.$i,
    	            'pass' => md5(md5(123456)),
    	            'nickname' => mb_substr($name_1, $i ,1 , 'utf-8').mb_substr($name_2, $i ,1 , 'utf-8').mb_substr($name_3, $i ,1 , 'utf-8'),
    	            'tel' => 13000000000+$i,
    	            'email' => 'test'.$i.'@163.com',
    	            'addtime' => time(),
    	            'title' => $i%2,
    	            'created_at' => date('y-m-d h:i:s',time()),
    	            'updated_at' => date('y-m-d h:i:s',time()),
    	            'state' => $i%2,
    	        ]);
        }
    }
}
